package com.dxy.yesas2020goals.study.partone.disignprinciple.openclosedprinciple;

/**
 * @author victorydeng
 * @Classname JavaDiscountCourse
 * @Description java课程的打折促销类
 * @Date 2020/2/24 15:53
 * @Created by victorydeng
 */
public class JavaDiscountCourse extends JavaCourse {

  public JavaDiscountCourse(Integer id, String name, Double price) {
    super(id, name, price);
  }

  @Override
  public Double getPrice() {
    return super.getPrice() * 0.5; //0.5是折扣率
  }
  public Double getOriginPrice() {
    return super.getPrice();
  }
}
